#ifndef HTTP_SERVER_H
#define HTTP_SERVER_H

#include <string>
#include <thread>
#include <memory>
#include <chrono>

class HttpServer {
private:
    int port;
    std::string bind_address;
    bool running;
    std::unique_ptr<std::thread> server_thread;

public:
    HttpServer(int port = 8001, const std::string& bind_address = "127.0.0.1");
    ~HttpServer();
    
    void start();
    void stop();
    bool is_running() const { return running; }
    
private:
    void run();
    std::string get_content_type(const std::string& path);
    std::string read_file(const std::string& path);
};

#endif // HTTP_SERVER_H